
i=1
while i<10:
    k=1
    while k<10-i:
        print(end='       ')
        k+=1
    j = 1
    while j<=i:
        print("%d*%d=%2d"%(j,i,j*i),end=' ')
        j+=1
    print("")
    i+=1
print("-----------------------")
i=9
while i>=1:
    j = 1
    while j<=i:
        print("%d*%d=%2d"%(j,i,j*i),end=' ')
        j+=1
    print("")
    i-=1
print("-----------------------")
i=1
while i <= 9:
    j=1
    while j<=i:
        print("%d*%d=%d"%(j,i,j*i),end=' ')
        j=1+j
    print("\n")
    i=1+i
print("-----------------------")
i=9
while i>=1:
    j = 1
    while j<=i:
        print("%d*%d=%2d"%(j,i,j*i),end=' ')
        j+=1
    print("")
    i-=1  
print("-----------------------")  
j=9
while 1<=j:
    i=9
    while i>=j:
        print("%d*%d=%2d"%(i,j,i*j),end=' ')
        i=i-1
    print("")
    j=j-1  

'''
i=9
j=1
while i>1 and j<=i and i-1 and i*j<=9:
    print("%d*%d=%2d"%(i,j,i*j),end=' ')  
    i=1

'''








